import 'package:flutter/material.dart';

class GradientAppBar extends StatelessWidget implements PreferredSizeWidget {
  final String title;
  final double height;
  final Gradient gradient;

 const GradientAppBar({
    super.key,
    required this.title,
    required this.height,
    required this.gradient,
  });

  @override
  Widget build(BuildContext context) {
    return Container(
      height: height,
      decoration: BoxDecoration(
        gradient: gradient,
      ),
      child: AppBar(
        backgroundColor: Colors.transparent,
        elevation: 0,
        title: Text(title, style: const TextStyle(fontSize: 20,color: Colors.white)),
      ),
    );
  }

  @override
  Size get preferredSize => Size.fromHeight(height);
}